package com.zz.designp._05_prototype;

/**
 * @author zhr
 */
public class PrototypePatternDemo {
    public static void main(String[] args) {
        ShapeCache.loadCache();

        Shape shape = ShapeCache.getShape("1");
        System.out.println("Shape : " + shape.getType());
        shape.draw();

        shape = ShapeCache.getShape("2");
        System.out.println("Shape : " + shape.getType());
        shape.draw();

        shape = ShapeCache.getShape("3");
        System.out.println("Shape : " + shape.getType());
        shape.draw();
    }
}
